home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / c / c-tools-.000 / c-tools- / c-tools-0.4 / lex.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-13  |  1.8 KB  |  54 lines

  1. /* $Id: lex.h,v 1.8 1995/08/08 14:42:44 sandro Exp $ */
  2.  
  3. /* This program is free software; you can redistribute it and/or modify
  4.    it under the terms of the GNU General Public License as published by
  5.    the Free Software Foundation; either version 2 of the License, or
  6.    (at your option) any later version.
  7.  
  8.    This program is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.    GNU General Public License for more details.
  12.  
  13.    You should have received a copy of the GNU General Public License
  14.    along with this program; if not, write to the Free Software
  15.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  16.  
  17.  
  18. #ifndef __LEX_H
  19. #define __LEX_H
  20.  
  21. #include <stdio.h>
  22.  
  23. enum {
  24.     NUMBER=256, IDENTIFIER, CHARACTER, STRING, COMMENT, DIRECTIVE,
  25.  
  26.     KW_AUTO, KW_BREAK, KW_CASE, KW_CHAR, KW_CONST,
  27.     KW_CONTINUE, KW_DEFAULT, KW_DO, KW_DOUBLE, KW_ELSE,
  28.     KW_ENUM, KW_EXTERN, KW_FLOAT, KW_FOR, KW_GOTO, KW_IF,
  29.     KW_INT, KW_LONG, KW_REGISTER, KW_RETURN, KW_SHORT,
  30.     KW_SIGNED, KW_SIZEOF, KW_STATIC, KW_STRUCT, KW_SWITCH,
  31.     KW_TYPEDEF, KW_UNION, KW_UNSIGNED, KW_VOID, KW_VOLATILE,
  32.     KW_WHILE,
  33.     TK_DECREMENT, TK_INCREMENT,
  34.     TK_ADD_ASSIGN, TK_SUB_ASSIGN, TK_MUL_ASSIGN, TK_DIV_ASSIGN,
  35.     TK_MOD_ASSIGN, TK_AND_ASSIGN, TK_OR_ASSIGN, TK_XOR_ASSIGN,
  36.     TK_LEFT_ASSIGN, TK_RIGHT_ASSIGN,
  37.     TK_PTR_OP, TK_EQ_OP, TK_NE_OP, TK_AND_OP, TK_OR_OP, TK_GE_OP,
  38.     TK_LE_OP, TK_LEFT_OP, TK_RIGHT_OP,
  39.     TK_ELLIPSIS,
  40.  
  41.     LEX_LAST_TOKEN = TK_ELLIPSIS
  42. };
  43.  
  44. extern char *lex_token_buffer;
  45. extern int lex_lineno;
  46. extern int lex_return_white_spaces;
  47. extern int lex_return_directives;
  48.  
  49. extern int gettoken (void);
  50. extern void init_lex (void);
  51. extern void done_lex (void);
  52.  
  53. #endif /* __LEX_H */
  54.